<?php
require("config.php");
if (!$_SESSION['user']) {
    header('Location: index.php');
    exit();
}
require("fun/data/sql_ope.php");
$obj = $_SESSION['user'];
$res = '昵称：' . $tq_user->user_info($obj, '昵称') . '<br>';
$res = $res . '生命：' . $tq_user->user_info($obj, '生命') . '<br>';
$res = $res . '法力：' . $tq_user->user_info($obj, '法力') . '<br>';
$res = $res . '位置：' . $tq_user->user_info($obj, '位置') . '<br>';
?>
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <title><?php echo $cfg_arr['title']; ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
      maximum-scale=1.0, user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" type="text/css" href="layer/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="css/web.css" />
</head>

<body class="layui-layout-body">
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo"><?php echo $cfg_arr['title']; ?><p style='margin-left:10px' class="layui-badge layui-bg-blue">Ver:<?php echo $cfg_arr['ver']; ?></p>
            </div>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;"><?php echo $tq_user->user_info($_SESSION['user'], '昵称'); ?></a>
                    <dl class="layui-nav-child">
                        <dd><a href="">注销(待开发)</a></dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-body">
            <div style="padding: 15px;"><?php echo $res; ?></div>
        </div>

        <div class="layui-footer">
            <div class="layui-row">
                <div onclick="JavaScript:tq_tab(1);" align="center" class="layui-col-xs3">
                    <i id='tq_tab_1' class="layui-icon layui-icon-username" style="color:#009688;">功能</i>
                </div>
                <div onclick="JavaScript:tq_tab(2);" align="center" class="layui-col-xs3">
                    <i id='tq_tab_2' class="layui-icon layui-icon-close-fill">待开发</i>
                </div>
                <div onclick="JavaScript:tq_tab(3);" align="center" class="layui-col-xs3">
                    <i id='tq_tab_3' class="layui-icon layui-icon-close-fill">待开发</i>
                </div>
                <div onclick="JavaScript:tq_tab(4);" align="center" class="layui-col-xs3">
                    <i id='tq_tab_4' class="layui-icon layui-icon-close-fill">待开发</i>
                </div>
            </div>
        </div>
    </div>
    <script src="js/jquery.min.js"></script>
    <script src="layer/layui.js"></script>
    <script>
        layui.use(['layer', 'form', 'element'], function() {
            var layer = layui.layer,
                form = layui.form,
                element = layui.element;
        });

        function tq_tab(type) {
            /* 先切换颜色 */
            for (i = 1; i < 5; i++) {
                if (i == type) {
                    color = "#009688;"
                } else {
                    color = "#000000;"
                }
                $("#tq_tab_" + i).attr("style", "color:" + color);
            }
            /* 暂时无其他功能 */
            if (type !== 1) {
                layer.msg('暂未开发');
                $("#tq_tab_1").attr("style", "color:#009688;");
                $("#tq_tab_" + type).attr("style", "color:#000000;");
                return;
            }
        }
    </script>
</body>
<html>